//
//  HitTestViewController.m
//  iOSCodeLearning
//
//  Created by TFAppleWork-Summer on 2018/5/2.
//  Copyright © 2018年 Ace. All rights reserved.
//

#import "HitTestViewController.h"
#import "ChildBtn.h"
@interface HitTestViewController ()

@end

@implementation HitTestViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (IBAction)btnClick:(ChildBtn *)sender {
    
    UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
    [btn setImage:[UIImage imageNamed:@"duihuakuang"] forState:UIControlStateNormal];
    [btn setImage:[UIImage imageNamed:@"timg1"] forState:UIControlStateHighlighted];
    
    sender.btn = btn;
    
    btn.frame = CGRectMake(CGRectGetWidth(sender.frame)/2, -80, 100, 80);
    
    [sender addSubview:btn];
    
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
